﻿<Stack Gap="12" Orientation="horizontal">
    @if (!string.IsNullOrEmpty(LeftIcon))
    {
        <Stack AlignSelf="center">
            <Icon IconName="@LeftIcon" />
        </Stack>
    }
    <Stack AlignItems="center" Width="100%" Orientation="horizontal" Gap="12">
        <Stack Width="100%" Gap="2">
            <Text Text="@Title" TextStyle="body1" />
            <Text Text="@Subtitle" TextStyle="caption" />
        </Stack>
        @ChildContent
    </Stack>
</Stack>

@code {
    [Parameter] public string LeftIcon { get; set; }
    [Parameter] public string Title { get; set; } = "Title";
    [Parameter] public string Subtitle { get; set; }
    [Parameter] public RenderFragment ChildContent { get; set; }
}
